package com.kk.demo.java8.lambda.base;

import java.util.Arrays;
import java.util.List;

public class UserBaseOne {

    public UserBaseOne() {
    }

    public static void main(String[] args) {
        List<Integer> costBeforeTax = Arrays.asList(100, 200, 300, 400, 500);
        double bill = costBeforeTax.stream().map((cost) -> cost + .12 * cost).reduce((sum, cost) -> sum + cost).get();
        System.out.println("Total : " + bill);
    }

}
